/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package UtilidadesRegistro;

import bd_registro_civil.Juez;
import java.awt.Component;
import javax.swing.DefaultListCellRenderer;
import javax.swing.JList;

/**
 *
 * @author Earving
 */
public class RenderJuez extends DefaultListCellRenderer {

    @Override
    public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus)
    {
        super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
        setText("");
        if (value instanceof Juez)
        {
            Juez t = (Juez) value;
            setText(t.getNombre()+" "+t.getApp()+" "+t.getApm());
        }
        return this;
    }
}
